﻿using System.Net.Mail;
using Services.Abstract;

namespace Services.Concrete
{
    public class EmailService : IEmailService
    {
        public void Send(MailMessage message)
        {
            var smtpClient = new SmtpClient();
            smtpClient.Send(message);
        }

        public void Send(string to, string subject, string body)
        {
            MailMessage message = new MailMessage();
            message.To.Add(to);
            message.Subject = subject;
            message.Body = body;
            message.IsBodyHtml = true;

            Send(message);
        }
    }
}